1. Field of the Invention
The present invention relates to a numerical control apparatus for machine tool and a numerical control method for machine tool. Particularly it relates to a numerical control apparatus and method in which efficiency in transformation of an NC program into an electronic cam program can be improved to thereby attain improvement in machining efficiency.
2. Background Art
There is commonly known a numerical control machine tool used for machining a material into a desired shape by using a tool such as a cutter in the condition that the material is set in the machine tool. For example, the numerical control machine tool operates as follows. A numerical control program (NC program) is generated. Respective portions inclusive of the tool such as a cutter are operated automatically by the NC program to thereby obtain a product processed into a desired shape.
The NC program per se generated for obtaining such a machined product can be generally generated and corrected on the numerical control machine tool. When, for example, nonconformity that the machined product does not satisfy tolerance on design is detected as a result of trial cutting of the machined product, the NC program can be corrected on the machine tool side to eliminate the nonconformity. As result, high working efficiency can be provided.
On the other hand, use of an electronic cam program instead of the NC program is known. A material set in a machine tool is machined into a desired shape by use of a tool such as a cutter under control using the electronic cam program. For example, control using the electronic cam program has been disclosed in JP-A-2001-170843.
That is, as disclosed in JP-A-2001-170843, command data of a moving axis at every moment is generated on the basis of rotation position data generated at every moment by a pulse signal output from a pulse encoder mounted on a reference axis and command position data of the moving axis set in accordance with unit rotation position of the reference axis. Command velocity data of the moving axis in synchronism with the rotational velocity of a rotary object is generated on the basis of the moving command data and the rotation position data. The position of a tool is controlled on the basis of the moving command data and the command velocity data generated as described above. In the numerical control machine tool using this type electronic cam program, respective position data of a tool and a workpiece with respect to an accumulated rotation angle of a main shaft are decided. There is an advantage that machining can be made accurately in a short time compared with the numerical control machine tool using the NC program.
Generally, graphic information, designated machining paths, machining steps, tool information, tooling information, etc. are input to a CAM software or the like installed in a personal computer or the like provided separately from the numerical control machine tool to thereby generate this type electronic cam program. It is conceived that a certain kind of transformer software is used for transforming an NC program into an electronic cam program.
According to the background-art configuration, the following problem occurs.
When a machine tool is to be operated by an electronic cam program, the electronic cam program for operating the machine tool needs to be generated as a fixed program in advance and must have reasonable continuous data.
When, for example, block skip is to be executed in the case where the machine tool is operated by an NC program, the block skip can be executed without any trouble because data to be moved from the coordinate value of a block skip source to the coordinate value of a block skip destination can be generated during the execution even in the case where the coordinate value of the block skip source is different from the coordinate value of the block skip destination.
On the other hand, when the machine tool is to be operated under electronic cam program control, it is difficult to change data in accordance with whether block skip is executed or not, because the electronic cam program for operating the machine tool is a fixed program. Moreover, if block skip is executed, there is a high possibility that continues data cannot be obtained. Generally, in the case of electronic cam control, a servomotor is driven to move a tool directly to a command position generated at every synchronous timing. Accordingly, the moving distance between two points of timing is limited as a matter of course. Accordingly, when continuous data as described above are not obtained, there is fear that position control cannot be made.
On the other hand, an electronic cam program may be generated in advance so that the coordinate value of a block skip destination coincides with the coordinate value of a block skip source to thereby obtain reasonable continuous data regardless of block skip. In this case, the locus of the NC program before transformation is however changed, so that the possibility of interference of the machine tool increases undesirably. In addition, there is an undesirable possibility that the machine tool cannot operate in accordance with the locus intended by the user. Of course, if the configuration of the machine tool is selected suitably, no fear of interference may be obtained though the locus is changed. In this case, the aforementioned method can be used.
For the aforementioned reason, in the background art, when the coordinate value of the block skip source is different from the coordinate value of the block skip destination, the generation of the electronic cam program is stopped while a message indicating that the NC program cannot be transformed into an electronic cam program is displayed. Accordingly, there are a lot of NC programs that cannot be transformed into electronic cam programs. As a result, there is a problem that an effect of improving machining efficiency cannot be obtained sufficiently.